<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen"/>

</head>
<body>
<header th:replace="common/IncludeTop"></header>
<div id="Content">
    <div id="BackLink">
        <a th:href="'/catalog/viewProduct?productId='+${product.productId}">
            返回<label th:text="${product.productId}">Product ID</label>
        </a>
    </div>

    <div id="Catalog">

        <table>
            <tr>
                <td>
                    <img th:src="${product.descriptionImage}">
                    <label th:text="${product.descriptionText}"></label>
                </td>
            </tr>
            <tr>
                <td>
                    <b th:text="${item.itemId}">Item ID</b>
                </td>
            </tr>
            <tr>
                <td>
                    <b>
                        <font size="4" th:text="${item.attribute}">Item Attribute </font>

                    </b>
                </td>
            </tr>
            <tr>
                <td th:text="${item.name}">Item Name</td>
            </tr>
            <tr>
                <td th:if="${item.quantity <= 0}">
                    Back ordered.
                </td>
                <td th:if="${item.quantity >0}" th:text="${item.quantity}+'in stock.'">
                    Quantity
                </td>
            </tr>
            <tr>
                <td th:text="'$'+${#numbers.formatDecimal(item.listPrice,1,2)}">
                    Item List Price
                </td>
            </tr>

            <tr>
                <td>
                    <a class="Button" th:href="@{../cart/addItemToCart?workingItemId=}+${item.itemId}">加入购物车</a>
                </td>
            </tr>
        </table>

    </div>
</div>
<footer th:replace="common/IncludeBottom"></footer>
</body>
</html>